package com.hulk.ratel.common.constant.enums;



import com.google.common.base.Objects;
/**
 * 1-启用
 * 0-停用
 */
public enum UseFlag {
	Y("Y","启用"),
	N("N","停用");
	private String value;
    private String desc;

    UseFlag(String value, String desc) {
		this.value = value;
		this.desc = desc;
	}

	public static String explain(String value) {
		for (UseFlag obj : UseFlag.values()) {
			if (Objects.equal(value, obj.value)) {
				return obj.desc;
			}
		}
		return value;
	}
	
	public String getValue() {
		return value;
	}

	public String getDesc() {
		return desc;
	}
	@Override
	public String toString() {
		return this.value;
	}
}
